Optimal. Leaf size=174 \[ \frac {(A+B+C) \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{4 a f (c-c \sin (e+f x))^{3/2}}-\frac {(A-B-3 C) \cos (e+f x) \log (1-\sin (e+f x))}{4 c f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}+\frac {(A-B+C) \cos (e+f x) \log (1+\sin (e+f x))}{4 c f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.41, antiderivative size = 174, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 5, integrand size = 50, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {3114, 3048,
2816, 2746, 31} \begin {gather*} \frac {(A+B+C) \cos (e+f x) \sqrt {a \sin (e+f x)+a}}{4 a f (c-c \sin (e+f x))^{3/2}}-\frac {(A-B-3 C) \cos (e+f x) \log (1-\sin (e+f x))}{4 c f \sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)}}+\frac {(A-B+C) \cos (e+f x) \log (\sin (e+f x)+1)}{4 c f \sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 2746
Rule 2816
Rule 3048
Rule 3114
Rubi steps
\begin {align*} \int \frac {A+B \sin (e+f x)+C \sin ^2(e+f x)}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))^{3/2}} \, dx &=\frac {(A+B+C) \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{4 a f (c-c \sin (e+f x))^{3/2}}-\frac {\int \frac {-2 a^2 (A-B-C)+4 a^2 C \sin (e+f x)}{\sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \, dx}{4 a^2 c}\\ &=\frac {(A+B+C) \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{4 a f (c-c \sin (e+f x))^{3/2}}+\frac {(A-B-3 C) \int \frac {\sqrt {a+a \sin (e+f x)}}{\sqrt {c-c \sin (e+f x)}} \, dx}{4 a c}+\frac {(A-B+C) \int \frac {\sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx}{4 c^2}\\ &=\frac {(A+B+C) \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{4 a f (c-c \sin (e+f x))^{3/2}}+\frac {((A-B-3 C) \cos (e+f x)) \int \frac {\cos (e+f x)}{c-c \sin (e+f x)} \, dx}{4 \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}+\frac {(a (A-B+C) \cos (e+f x)) \int \frac {\cos (e+f x)}{a+a \sin (e+f x)} \, dx}{4 c \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}\\ &=\frac {(A+B+C) \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{4 a f (c-c \sin (e+f x))^{3/2}}-\frac {((A-B-3 C) \cos (e+f x)) \text {Subst}\left (\int \frac {1}{c+x} \, dx,x,-c \sin (e+f x)\right )}{4 c f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}+\frac {((A-B+C) \cos (e+f x)) \text {Subst}\left (\int \frac {1}{a+x} \, dx,x,a \sin (e+f x)\right )}{4 c f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}\\ &=\frac {(A+B+C) \cos (e+f x) \sqrt {a+a \sin (e+f x)}}{4 a f (c-c \sin (e+f x))^{3/2}}-\frac {(A-B-3 C) \cos (e+f x) \log (1-\sin (e+f x))}{4 c f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}+\frac {(A-B+C) \cos (e+f x) \log (1+\sin (e+f x))}{4 c f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.51, size = 196, normalized size = 1.13 \begin {gather*} \frac {\left (A+B+C+(-A+B+3 C) \log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^2+(A-B+C) \log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^2\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )}{2 f \sqrt {a (1+\sin (e+f x))} (c-c \sin (e+f x))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(475\) vs.
\(2(156)=312\).
time = 25.38, size = 476, normalized size = 2.74
method | result | size |
default | \(-\frac {\left (A \ln \left (\frac {1-\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right ) \sin \left (f x +e \right )-A \sin \left (f x +e \right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-B \ln \left (\frac {1-\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right ) \sin \left (f x +e \right )+B \sin \left (f x +e \right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )+C \ln \left (\frac {1-\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right ) \sin \left (f x +e \right )+3 C \ln \left (-\frac {-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right ) \sin \left (f x +e \right )-2 C \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right ) \sin \left (f x +e \right )-A \sin \left (f x +e \right )-A \ln \left (\frac {1-\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )+A \ln \left (-\frac {-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-B \sin \left (f x +e \right )+B \ln \left (\frac {1-\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-B \ln \left (-\frac {-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-\sin \left (f x +e \right ) C -C \ln \left (\frac {1-\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-3 C \ln \left (-\frac {-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )+2 C \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )\right ) \cos \left (f x +e \right )}{2 f \sqrt {a \left (1+\sin \left (f x +e \right )\right )}\, \left (-c \left (\sin \left (f x +e \right )-1\right )\right )^{\frac {3}{2}}}\) | \(476\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A + B \sin {\left (e + f x \right )} + C \sin ^{2}{\left (e + f x \right )}}{\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )} \left (- c \left (\sin {\left (e + f x \right )} - 1\right )\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.56, size = 252, normalized size = 1.45 \begin {gather*} -\frac {\frac {{\left (A \sqrt {a} \sqrt {c} - B \sqrt {a} \sqrt {c} + C \sqrt {a} \sqrt {c}\right )} \log \left (-\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )}{a c^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {2 \, {\left (A \sqrt {a} \sqrt {c} - B \sqrt {a} \sqrt {c} - 3 \, C \sqrt {a} \sqrt {c}\right )} \log \left ({\left | \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}\right )}{a c^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} + \frac {A \sqrt {a} \sqrt {c} + B \sqrt {a} \sqrt {c} + C \sqrt {a} \sqrt {c}}{a c^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}}}{4 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {C\,{\sin \left (e+f\,x\right )}^2+B\,\sin \left (e+f\,x\right )+A}{\sqrt {a+a\,\sin \left (e+f\,x\right )}\,{\left (c-c\,\sin \left (e+f\,x\right )\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________